<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>axis_switch: xaxis_switch_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">axis_switch
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxis__switch__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">xaxis_switch_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file demonstrates the use AXI4-Stream Switch Control Router driver. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who Date     Changes
<hr/>

1.00  sha 01/28/15 Initial release.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aa2a34a2df24773fe27ebbb97e2716456"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxis__switch__example_8c.html#aa2a34a2df24773fe27ebbb97e2716456">XAXIS_SWITCH_DEVICE_ID</a>&#160;&#160;&#160;XPAR_AXIS_SWITCH_0_DEVICE_ID</td></tr>
<tr class="memdesc:aa2a34a2df24773fe27ebbb97e2716456"><td class="mdescLeft">&#160;</td><td class="mdescRight">The following constants map to the XPAR parameters created in the xparameters.h file.  <a href="#aa2a34a2df24773fe27ebbb97e2716456">More...</a><br /></td></tr>
<tr class="separator:aa2a34a2df24773fe27ebbb97e2716456"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afb4a902539841ccf21c9b6daf08e36ff"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxis__switch__example_8c.html#afb4a902539841ccf21c9b6daf08e36ff">AxisSwitch_Example</a> (u16 DeviceId)</td></tr>
<tr class="memdesc:afb4a902539841ccf21c9b6daf08e36ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the use of AXI-Stream Switch driver functions.  <a href="#afb4a902539841ccf21c9b6daf08e36ff">More...</a><br /></td></tr>
<tr class="separator:afb4a902539841ccf21c9b6daf08e36ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxis__switch__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function for AXI4-Stream Switch example.  <a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br /></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a6c9c949af1b8249e863d8f032191c9bf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_axis___switch.html">XAxis_Switch</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxis__switch__example_8c.html#a6c9c949af1b8249e863d8f032191c9bf">AxisSwitch</a></td></tr>
<tr class="memdesc:a6c9c949af1b8249e863d8f032191c9bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Instance of the AXI4-Stream Switch core.  <a href="#a6c9c949af1b8249e863d8f032191c9bf">More...</a><br /></td></tr>
<tr class="separator:a6c9c949af1b8249e863d8f032191c9bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="aa2a34a2df24773fe27ebbb97e2716456"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2a34a2df24773fe27ebbb97e2716456">&#9670;&nbsp;</a></span>XAXIS_SWITCH_DEVICE_ID</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XAXIS_SWITCH_DEVICE_ID&#160;&#160;&#160;XPAR_AXIS_SWITCH_0_DEVICE_ID</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The following constants map to the XPAR parameters created in the xparameters.h file. </p>
<p>They are defined here such that a user can easily change all the needed parameters in one place. </p>

<p class="reference">Referenced by <a class="el" href="xaxis__switch__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="afb4a902539841ccf21c9b6daf08e36ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb4a902539841ccf21c9b6daf08e36ff">&#9670;&nbsp;</a></span>AxisSwitch_Example()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxisSwitch_Example </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the use of AXI-Stream Switch driver functions. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the unique device id of the AXI4-Stream Switch core.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if AXI4-Stream Switch example ran successfully.</li>
<li>XST_FAILURE if AXI4-Stream Switch example failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="struct_x_axis___switch___config.html#aae0afeb8540a529d8080e73280ab5109">XAxis_Switch_Config::BaseAddress</a>, <a class="el" href="group__axis__switch__v1__1.html#ga91d899fe6d8456f8460acd4a122dce64">XAxisScr_CfgInitialize()</a>, <a class="el" href="group__axis__switch__v1__1.html#ga35ef34ba6c57b57506741b4a04f87e75">XAxisScr_IsMiPortEnabled()</a>, <a class="el" href="group__axis__switch__v1__1.html#gaa631f268bd77eca8acc9534775649df1">XAxisScr_LookupConfig()</a>, <a class="el" href="group__axis__switch__v1__1.html#ga1fcba7107d4ecb9955aa302c1b798729">XAxisScr_MiPortDisable()</a>, <a class="el" href="group__axis__switch__v1__1.html#ga84a532ac4e377199c15802d84b43256e">XAxisScr_MiPortDisableAll()</a>, <a class="el" href="group__axis__switch__v1__1.html#ga943a402b210b5f2901b6d6e7ae323d50">XAxisScr_MiPortEnable()</a>, <a class="el" href="group__axis__switch__v1__1.html#gafc168e986cd2b401045578c06bc90869">XAxisScr_RegUpdateDisable</a>, and <a class="el" href="group__axis__switch__v1__1.html#gaa82658cbc43e600c53a429fce04d3a4c">XAxisScr_RegUpdateEnable</a>.</p>

<p class="reference">Referenced by <a class="el" href="xaxis__switch__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function for AXI4-Stream Switch example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if AXI4-Stream Switch example ran successfully.</li>
<li>XST_FAILURE if AXI4-Stream Switch example failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Axis_Switch core connects up to 16 masters to 16 slaves. </dd></dl>

<p class="reference">References <a class="el" href="xaxis__switch__example_8c.html#afb4a902539841ccf21c9b6daf08e36ff">AxisSwitch_Example()</a>, and <a class="el" href="xaxis__switch__example_8c.html#aa2a34a2df24773fe27ebbb97e2716456">XAXIS_SWITCH_DEVICE_ID</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a6c9c949af1b8249e863d8f032191c9bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c9c949af1b8249e863d8f032191c9bf">&#9670;&nbsp;</a></span>AxisSwitch</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_x_axis___switch.html">XAxis_Switch</a> AxisSwitch</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Instance of the AXI4-Stream Switch core. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
